<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<script type="text/javascript">
	$(function(){
		var ml=$("#pop_mail_login");
		ml.bind("click",function(){
			var lb=$("#pop_login_box");
			if(lb.is(":hidden")){
				lb.slideDown("fast");
			}else{
				lb.slideUp("fast");
			}
			
		});
		$("#pop_login_name").val("邮箱 或 昵称").css({
			'color' : 'gray',
			'font-size' : '12px'

		});
		$("#pop_login_name").click(function() {
			$("#pop_login_name").next('span').html("");
			if($(this).val()=="邮箱 或 昵称"){
				$(this).val("");
			}
			
			$(this).css('color', 'black');
		}).blur(function() {
			var curVal = $(this).val();
			if ($.trim(curVal) == "") {
				$(this).val("邮箱 或 昵称");
				$(this).css({
					'color' : 'gray',
					'font-size' : '12px'

				});
			}
		});
		$.validator.addMethod("notEqual", function(value, element, param) {
			   return value != param;
		}, $.validator.format("请填写你的用户名"));
		$("#pop_login_form").validate(
				{
					errorClass:"login_error",
					rules : {
						loginName : {
							required : true,
							notEqual : "邮箱 或 昵称"
						},
						loginPwd : {
							required : true
						}
					},
					messages : {
						loginName : {
							required : "请填写你的用户名"
						},
						loginPwd : {
							required : "请填写密码"
						}
					},
					submitHandler:function(form) {
						$(form).ajaxSubmit(function(data){
							if(data=="nologin"){
								$("#pop_login_name").next('span').append('<label class="login_error">用户名密码错误</label>')
							}else{
								window.location.href=data;
							}
						});
					}
				});
	});
</script>
<style type="text/css">
	.login_error{color: #f69;}
	label.login_error{padding:0 0 0 75px; display:block;margin:5px 0 0 0; height:14px; line-height:14px; overflow:hidden;}
</style>
<div class="release_box tc_login_box tc_box" id="tc_box">
    	<div class="release_title else_font">
        	<a href="javascript:void(0)" class="tc_close close_btn">关闭</a>
            <p class="espe_tit">登录果果街</p>
        </div>
        <div class="content clearfix">
        	<div class="tc_login">
            	<h3>使用以下网站账号直接登录果果街</h3>
                <div class="tc_login_sorts">
                    <a href="/member/sinalogin.htm?historyUrl=${historyUrl }" class=" reg_btn"><img src="../../images/v4/common/lr_icon_1.jpg"><span>新浪微博</span></a>
                    <a href="/member/tencentlogin.htm?historyUrl=${historyUrl }" class=" reg_btn no_margin"><img src="../../images/v4/common/lr_icon_3.jpg"><span>腾讯微博</span></a>
                    <div class="blank20"></div>
                    <a href="/member/qqlogin.htm" class=" reg_btn"><img src="../../images/v4/common/lr_icon_2.jpg"><span>腾讯&nbsp;qq</span></a>
                    <a href="/member/toplogin.htm" class=" reg_btn no_margin"><img src="../../images/v4/common/lr_icon_4.jpg"><span>淘宝网</span></a>
                </div>
                 
                <form action="/member/login.htm" method="post" id="pop_login_form">
                <input type="hidden" name="historyUrl" value="${historyUrl }"/>
                <div class="login_slide_box">
                	<p class="tc_sepe"><span>或</span></p>
                	<p class="lr_tip">>><a href="javascript:void(0)" id="pop_mail_login">用果果街注册邮箱/昵称登录<img src="../../images/v4/common/lr_icon_5.jpg" class="icon" /></a></p>
                	<ul class="form_s1" style="display:none;" id="pop_login_box">
                    	<li>
                        	<label class="lbl">账 户：</label><input type="text" class="def_text_1 focus" name="loginName" id="pop_login_name"/>
                        </li>
                        <li>
                        	<label class="lbl">密 码：</label><input type="password" class="def_text_1 focus" name="loginPwd" id="pop_login_pwd"/>
                        </li>
                        <li>
                        	<input type="submit" class="btn_s1" value="登&nbsp;录">
                        </li>
                        
                    </ul>
                </div>
                </form>
            </div>
        </div>
</div>
